package com.panda.controller.cos;

import com.panda.utils.CosUtil;
import com.panda.utils.RespondResult;
import com.tencent.cloud.CosStsClient;
import com.tencent.cloud.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.TreeMap;

/**
 * 腾讯COS API文档 https://cloud.tencent.com/document/product/436/14048
 */
@RestController
@Api(tags = "获取对象存储临时密钥接口")
public class Cos {
    @Autowired
    private CosUtil cosUtil;
    @ApiOperation("获取密钥")
    @GetMapping("/credential")
    public RespondResult credential() {
        return cosUtil.getCredential();
    }
}
